package com.twu.biblioteca.view.utils;

import java.io.InputStream;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * User: cschlumb
 * Date: 22/08/2013
 * Time: 16:54
 * To change this template use File | Settings | File Templates.
 */
public class InputSystem implements Input {

    private final Scanner scanner;

    public InputSystem(InputStream inputStream) {
        scanner = new Scanner(inputStream);
    }

    @Override
    public String readString() {
        return scanner.next();
    }

    @Override
    public int readInt() {
        return scanner.nextInt();
    }
}
